package com.great.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.great.dao.UserCollectionMapper;
import com.great.model.pojo.UserCollection;
import com.great.model.pojo.UserInfo;
import com.great.service.IUserCollectionService;
@Service
public class UserCollectionService implements IUserCollectionService {
	@Resource
	private UserCollectionMapper userCollectionMapper;

	@Override
	public List<UserCollection> sgetUserCollection(UserInfo userInfo) {
		return userCollectionMapper.selectUserCollection(userInfo);
	}
	@Override
	public List<UserCollection> saddCollection(UserCollection userCollection) {
		userCollectionMapper.addUserCollection(userCollection);
		UserInfo userInfo=new UserInfo();
		userInfo.setUserId(userCollection.getUserId());
		return userCollectionMapper.selectUserCollection(userInfo);
	}
	public UserCollectionMapper getUserCollectionMapper() {
		return userCollectionMapper;
	}

	public void setUserCollectionMapper(UserCollectionMapper userCollectionMapper) {
		this.userCollectionMapper = userCollectionMapper;
	}

	
	
}
